package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbApplyCompetitionMapper;
import com.bsb.base.model.BsbApplyCompetition;
import com.bsb.base.model.BsbApplyCompetitionExample;

@Service
public class BsbApplyCompetitionService{
	
	@Resource
	private BsbApplyCompetitionMapper bsbApplyCompetitionMapper;
	
	public void addBsbApplyCompetition(BsbApplyCompetition bsbApplyCompetition) {
		bsbApplyCompetitionMapper.insertSelective(bsbApplyCompetition);
	}
	
	public void delBsbApplyCompetitionById(String id) {
		bsbApplyCompetitionMapper.deleteByPrimaryKey(id);
	}
	
	public void updateBsbApplyCompetition(BsbApplyCompetition bsbApplyCompetition) {
		bsbApplyCompetitionMapper.updateByPrimaryKeySelective(bsbApplyCompetition);
	}
	
	public void updateBsbApplyCompetitionByExample(BsbApplyCompetition bsbApplyCompetition,BsbApplyCompetitionExample bsbApplyCompetitionExample){
	    bsbApplyCompetitionMapper.updateByExampleSelective(bsbApplyCompetition,bsbApplyCompetitionExample);
	}
	
	public BsbApplyCompetition getBsbApplyCompetitionById(String id) {
		return bsbApplyCompetitionMapper.selectByPrimaryKey(id);
	}
	
	public List<BsbApplyCompetition> getPageBsbApplyCompetition(BsbApplyCompetitionExample bsbApplyCompetitionExample) {
		return bsbApplyCompetitionMapper.selectPage(bsbApplyCompetitionExample);
	}
	
	public int countBsbApplyCompetition(BsbApplyCompetitionExample bsbApplyCompetitionExample) {
		return bsbApplyCompetitionMapper.countByExample(bsbApplyCompetitionExample);
	}
	
	public List<BsbApplyCompetition> selectByExample(BsbApplyCompetitionExample example){
	    return bsbApplyCompetitionMapper.selectByExample(example);
	}
}
